package com.education.service;
import com.education.model.ResourceTCModel;
import com.education.model.StudyResModel;
import com.education.model.StudyResourceModel;
import com.github.pagehelper.PageInfo;

/**
 * 导学资源服务层接口
 * @author 申忠正
 *
 */
public interface IStudyResService {
    /**
     *@param pageNo 当前页
     *@param pageSize 总数据条数
     *@return PageInfo<StudyResourceModel> 分页实体 【里面存放的是导学资源List】
     *@throws Exception 业务处理层异常
     */
    PageInfo<ResourceTCModel> selectStudyResource(ResourceTCModel resourceTCModel,Integer pageNo, Integer pageSize)throws Exception;

    /**
     * 2017/8/11 修改入参对象 by 雷紫辉
     * @param sr
     * @return
     * @throws Exception
     */
    int addStudyResource(StudyResModel sr) throws Exception;

    /**
     * 删除一条资料信息
     * @param resourceId
     * @return
     * @throws Exception
     */
    int deleteResource(int resourceId) throws Exception;
    
    /**
     * 根据id查询资料信息
     * 2017/8/12 修改返回值类型 by 雷紫辉
     * @param resourceId 传入资源id
     * @return 返回一个 资源对象
     * @throws Exception
     */
     StudyResModel queryResById(int resourceId) throws Exception;
    /**
     * 更新资料信息
     * @param studyResModel 实体
     * @return int update影响的行数
     * @throws Exception
     */
    int updateResource(StudyResModel studyResModel) throws Exception;


    /**
     * 教师Id查询其发布的所有资料
     * 2017/8/10  新增 by 雷紫辉
     * @param teacherId
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<StudyResModel> getStudyResByTeacherId(Integer teacherId,Integer pageNum,Integer pageSize);
}
